package com.lsmo.android.carfans.process.favorites;

import java.util.ArrayList;
import java.util.List;

import com.lsmo.android.carfans.model.favorites.FavoritesThread;
import com.lsmo.android.common.base.BaseProcess;

public class FavoritesProcess extends BaseProcess {
	
	public static final String TAG = FavoritesProcess.class.getSimpleName();
	
	public FavoritesProcess() {
		
	}
	
	/**
	 * 获取收藏经销商列表
	 * 
	 * @param params
	 * @return
	 */
	public List<FavoritesThread.CarDistributor> getDistributorThreadsList(String[] params) {
		List<FavoritesThread.CarDistributor> list = new ArrayList<FavoritesThread.CarDistributor>();
		int i = 0;
		FavoritesThread.CarDistributor fc = null;
		while (i < 5) {
			i++;
			fc = new FavoritesThread().new CarDistributor();
			fc.setId(String.valueOf(i));
			fc.setjName("奥迪4S店");
			fc.setType("4S店");
			fc.setPhone("4008006666");
			fc.setAddress("浙江省杭州市绍兴路100号");
			list.add(fc);
		}
		return list;
	}
	
	/****
	 * 获取收藏车型列表
	 * 
	 * @param params
	 * @return
	 */
	public List<FavoritesThread.CarModel> getModelThreadsList(String[] params) {
		
//		Global global = Global.getInstance();
//		Log.i("com.lsmo.android.carfans", "当前context是：" + global.getContext());
		
//		String sql = "SELECT Id,Image,ModelName,DistributorPriceRange FROM CarModel WHERE IsFavorites = 0";
//		DBUtils dbUtils = new DBUtils(global.getContext());
		
		FavoritesThread.CarModel f = null;
		List<FavoritesThread.CarModel> list = new ArrayList<FavoritesThread.CarModel>();
		
		int i = 0;
		while (i < 5) {
			i++;
			f = new FavoritesThread().new CarModel();
			f.setId(String.valueOf(i));
			f.setImage("aaa.jpg");
			f.setName("abc");
			f.setDistributorPriceRange("经销商报价：9.99~11.79万");
			list.add(f);
		}
		return list;
	}
}